From: Lars Magne Ingebrigtsen Date: Sun, 21 Aug 2011 19:27:27 +0000 (+0200) Subject: Only bind `coding-system-for-*' around the process open call to avoid auth-source... X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~2523 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=8aee3359bad806ee03c2bc7d42d5d98e5ab0202d;p=emacs.git Only bind `coding-system-for-*' around the process open call to avoid auth-source side effects. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bb239f3ad02..6afc4dff75e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-08-21 Lars Magne Ingebrigtsen + + * mail/smtpmail.el (smtpmail-via-smtp): Only bind + `coding-system-for-*' around the process open call to avoid + auth-source side effects. + 2011-08-21 Chong Yidong * term.el (term-mouse-paste): Yank primary selection (Bug#6845). diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index caec69e7e9e..381af3b963a 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -622,8 +622,6 @@ The list is in preference order.") (and mail-specify-envelope-from (mail-envelope-from)) user-mail-address)) - (coding-system-for-read 'binary) - (coding-system-for-write 'binary) response-code process-buffer result @@ -642,21 +640,23 @@ The list is in preference order.") (erase-buffer)) ;; open the connection to the server - (setq result - (open-network-stream - "smtpmail" process-buffer host port - :type smtpmail-stream-type - :return-list t - :capability-command (format "EHLO %s\r\n" (smtpmail-fqdn)) - :end-of-command "^[0-9]+ .*\r\n" - :success "^2.*\n" - :always-query-capabilities t - :starttls-function - (lambda (capabilities) - (and (string-match "-STARTTLS" capabilities) - "STARTTLS\r\n")) - :client-certificate t - :use-starttls-if-possible t)) + (let ((coding-system-for-read 'binary) + (coding-system-for-write 'binary)) + (setq result + (open-network-stream + "smtpmail" process-buffer host port + :type smtpmail-stream-type + :return-list t + :capability-command (format "EHLO %s\r\n" (smtpmail-fqdn)) + :end-of-command "^[0-9]+ .*\r\n" + :success "^2.*\n" + :always-query-capabilities t + :starttls-function + (lambda (capabilities) + (and (string-match "-STARTTLS" capabilities) + "STARTTLS\r\n")) + :client-certificate t + :use-starttls-if-possible t))) ;; If we couldn't access the server at all, we give up. (unless (setq process (car result))